![]() |
Cache Constants |
Header: Files.h |
Indicate whether or not data should be cached.
enum { pleaseCacheBit = 4, pleaseCacheMask = 16, noCacheBit = 5, noCacheMask = 32, rdVerifyBit = 6, rdVerifyMask = 64, rdVerify = 64, forceReadBit = 6, forceReadMask = 64, newLineBit = 7, newLineMask = 128, newLineCharMask = 65280 };
Tells the disk cache that you think that data will be accessed again soon; the data is more likely to be placed in the disk cache.
Tells the disk cache that you think the data will not be accessed again soon; whole sectors in the middle of the I/O are less likely to be placed in the disk cache.
Forces reads from disk, bypassing all caches. Clients can use this to verify that data is stored correctly on the media (eg., to verify after writing) by reading the data into a different buffer while setting the bit, and then comparing the newly read data with the previously written data.
The forceReadBit is the same as the rdVerifyBit used in the older APIs. The actual implementation of the rdVerifyBit in the older APIs actually caused the “force read” behavior, and only compared the data in partial sectors. FSReadFork cleans up this behavior by always letting the client do all of the compares.
For the FSWriteFork
calls, you may add either of the pleaseCacheMask or noCacheMask constants to one of the
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)